/*
 * @Author: zhangshu
 * @email: shiliang.zhang@tuya.com
 * @LastEditors: Please set LastEditors
 * @file name: app_mfg.h
 * @Description: 
 * @Copyright: HANGZHOU TUYA INFORMATION TECHNOLOGY CO.,LTD
 * @Company: http://www.tuya.com
 * @Date: 2022-02-08
 * @LastEditTime: 2022-02-08
 */
#ifndef __APP_MFG_H_
#define __APP_MFG_H_


#ifdef __cplusplus
extern "C" {
#endif

#include "app_common.h"

//mfg test enum
typedef enum {
    MFG_TEST_NONE,
    MFG_TEST_START,
    MFG_TEST_NET_KEY,
    MFG_TEST_LED,
    MFG_TEST_ALARM,
    MFG_TEST_TAMPER,
    MFG_TEST_TEMPERATURE_HUMIDITY,
    MFG_TEST_LIGHT_COLOR,
    MFG_TEST_BATTERY,
} MFG_TEST_E;

/**
 * @description: key mfg test callback
 * @param[in] key_id: key id
 * @return: TRUE when test success or else
*/
BOOL_T mfg_key_test_callback(UINT32_T key_id);

/**
 * @description: alarm1 mfg test callback
 * @param [in] {g_state} alarm gpio status
 * @return: TRUE when test success or else
 */
BOOL_T mfg_alarm1_test_callback(UINT8_T g_state);

/**
 * @description: tamper mfg test callback
 * @param [in] {g_state} tamper gpio status
 * @return: TRUE when test success or else
 */
BOOL_T mfg_tamper_test_callback(UINT8_T g_state);

/**
 * @description: trouble mfg test callback
 * @param [in] {g_state} trouble gpio status
 * @return: TRUE when test success or else
 */
BOOL_T mfg_trouble_test_callback(UINT8_T g_state);

/**
 * @description: temperature humidity mfg test callback
 * @param [in] {temp_data} temperature data
 * @param [in] {humi_data} humidity data
 * @return: TRUE when test success or else
 */
BOOL_T mfg_temperature_humidity_test_callback(INT16_T temp_data, UINT16_T humi_data);

/**
* @description: illuminance mfg test callback
* @param [in] {lux_data} illuminance data
* @return: TRUE when test success or else
*/
BOOL_T mfg_illuminance_test_callback(UINT16_T lux_data);

/**
* @description: clear mfg flag
* @param[in] none
* @return: none
*/
VOID_T clear_mfg_test_flag(VOID_T);

/**
 * @description: get mfg test flag
 * @param[in] none
 * @return: none
*/
UINT8_T get_mfg_test(VOID_T);

#ifdef __cplusplus
}
#endif

#endif // __TUYA_TMP_HUM_SENSOR_H_
